From f0cfba930c2315e76f68b6b4e7127daa68e7b7ad Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Thu, 19 Jul 2007 23:50:39 +0000 Subject: [PATCH] add note that the semantics of this call, when mixed with the new 2007-07-20 Ryan Lortie * gtk/gtkwidget.c (gtk_widget_is_composited): add note that the semantics of this call, when mixed with the new gdk_window_set_composited(), will change in the future. * gdk/x11/gdkevents-x11.c (gdk_event_translate): only grab Damage events that belong to us. svn path=/trunk/; revision=18506 --- ChangeLog | 9 +++++++++ gdk/gdkwindow.c | 3 ++- gdk/x11/gdkevents-x11.c | 8 +++++--- gdk/x11/gdkwindow-x11.c | 3 ++- gtk/gtkwidget.c | 5 +++++ 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 53cca51a3a..f2db9026c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-07-20 Ryan Lortie + + * gtk/gtkwidget.c (gtk_widget_is_composited): add note that the + semantics of this call, when mixed with the new + gdk_window_set_composited(), will change in the future. + + * gdk/x11/gdkevents-x11.c (gdk_event_translate): only grab Damage + events that belong to us. + 2007-07-19 Matthias Clasen * gtk/gtkentry.c (gtk_entry_completion_key_press): Handle diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index c2dac336df..2028693cb0 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -1,5 +1,6 @@ /* GDK - The GIMP Drawing Kit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * Copyright (C) 1995-2007 Peter Mattis, Spencer Kimball, + * Josh MacDonald, Ryan Lortie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c index 5c95de7dfa..d55b572dd5 100644 --- a/gdk/x11/gdkevents-x11.c +++ b/gdk/x11/gdkevents-x11.c @@ -1,5 +1,6 @@ /* GDK - The GIMP Drawing Kit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * Copyright (C) 1995-2007 Peter Mattis, Spencer Kimball, + * Josh MacDonald, Ryan Lortie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -2103,7 +2104,8 @@ gdk_event_translate (GdkDisplay *display, #endif #if defined(HAVE_XCOMPOSITE) && defined (HAVE_XDAMAGE) && defined (HAVE_XFIXES) if (display_x11->have_xdamage && window_private && window_private->composited && - xevent->type == display_x11->xdamage_event_base + XDamageNotify) + xevent->type == display_x11->xdamage_event_base + XDamageNotify && + ((XDamageNotifyEvent *) xevent)->damage == window_impl->damage) { XDamageNotifyEvent *damage_event = (XDamageNotifyEvent *) xevent; XserverRegion repair; @@ -2115,7 +2117,7 @@ gdk_event_translate (GdkDisplay *display, rect.height = damage_event->area.height; repair = XFixesCreateRegion (display_x11->xdisplay, - &damage_event->area, 1); + &damage_event->area, 1); XDamageSubtract (display_x11->xdisplay, window_impl->damage, repair, None); diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 045e5a0374..ae4fab0630 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -1,5 +1,6 @@ /* GDK - The GIMP Drawing Kit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * Copyright (C) 1995-2007 Peter Mattis, Spencer Kimball, + * Josh MacDonald, Ryan Lortie * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 8e784013c4..56829568c6 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -6154,6 +6154,11 @@ gtk_widget_propagate_screen_changed_recurse (GtkWidget *widget, * Whether @widget can rely on having its alpha channel * drawn correctly. On X11 this function returns whether a * compositing manager is running for @widget's screen. + * + * Please note that the semantics of this call will change + * in the future if used on a widget that has a composited + * window in its heirarchy (as set by + * gdk_window_set_composited()). * * Return value: %TRUE if the widget can rely on its alpha * channel being drawn correctly. -- 2.30.2